

(function($) {
	$.fn.validationEngineLanguage = function() {};
	$.validationEngineLanguage = {
		newLang: function() {
			$.validationEngineLanguage.allRules = 	{"required":{    			// Add your regex rules here, you can take telephone as an example
						"regex":"none",
						"alertText":"* 必填",
						"alertTextCheckboxMultiple":"*请选择一个选项",
						"alertTextCheckboxe":"* 必须选择一个选项"},
					"length":{
						"regex":"none",
						"alertText":"*介于",
						"alertText2":"到 ",
						"alertText3": "字符数"},
					"maxCheckbox":{
						"regex":"none",
						"alertText":"* Checks allowed Exceeded"},	
					"minCheckbox":{
						"regex":"none",
						"alertText":"* 请选择一个选项 ",
						"alertText2":" options"},	
					"confirm":{
						"regex":"none",
						"alertText":"* 所填入的确认密码与密码不一致"},		
					"telephone":{
						"regex":"/^[0-9\-\(\)\ ]+$/",
						"alertText":"* Invalid phone number"},	
					"email":{
						"regex":"/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/",
						"alertText":"* email 格式不符合"},	
					"date":{
                         "regex":"/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/",
                         "alertText":"* Invalid date, must be in YYYY-MM-DD format"},
					"onlyNumber":{
						"regex":"/^[0-9\ ]+$/",
						"alertText":"*只允许数字"},	
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z\u4e00-\u9fa5]+$/",
						"alertText":"* 不允许特殊字符"},	
					"ajaxVeriCode":{
						"file":"checkVeriCode.action",
						"extraData":"name=eric",
						"alertTextOk":"* Pass",	
						"alertTextLoad":"*  验证中...,请稍等",
						"alertText":"* 无效的验证码"},	
					"ajaxName":{
						"file":"checkUserName.action",
						"extraData":"name=eric",
						"alertText":"* 用户名已经被使用",
						"alertTextOk":"* 该用户名可用",	
						"alertTextLoad":"* Loading, 请稍等"},
					"ajaxEmail":{
							"file":"checkEmailExist.action",
							"extraData":"name=eric",
							"alertText":"* 邮箱地址已经被使用",
							"alertTextOk":"* 该邮箱可用",	
							"alertTextLoad":"* Loading, 请稍等"},
					"onlyLetter":{
						"regex":"/^[a-zA-Z\ \']+$/",
						"alertText":"* 只允许字母"}
					};	
		}
	};
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang();
});